home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / VS_804.ARJ / MAINTSRC.EXE / MAINT.PRG < prev    next >
Text File  |  1991-11-25  |  3KB  |  123 lines

  1. * Filename......: Maint.Prg
  2. *
  3. * Author........: Vernon E. Six, Jr.
  4. *
  5. * Last Update...: Sat  10-19-1991  21:54:38
  6. *
  7. * Notice........: Copyright (c) 1991 by Vernon E. Six, Jr.
  8. *                 All Rights Reserved World Wide
  9.  
  10. #include "INKEY.CH"
  11. #include "SETCURS.CH"
  12.  
  13. FUNCTION MAINT()
  14. *****
  15. * Data Dictionary Maintenance Utility
  16. *****
  17. LOCAL n_Top
  18.  
  19.  
  20.    *══ Some basic sets ═══════════════════════════════════════*
  21.    SET( _SET_EXCLUSIVE,  .F. )  // Allow Multiple Users
  22.    SET( _SET_SCOREBOARD, .F. )  // Don't show that Fugly line!!!!!!
  23.    SET( _SET_EXACT,      .F. )  // Normal String comparison
  24.    SET( _SET_DELETED,    .T. )  // Don't include deleted records
  25.  
  26.  
  27.    *══ Let's get the show on the road ════════════════════════*
  28.  
  29.    VS_InitVern("MAINT")
  30.    VS_NewScrn()
  31.    VS_InitHelp()
  32.    EX_Version( "Maint - Data Dictionary Maintenance Utility v1.01.05" )
  33.    EX_Release( "Mon  11-25-1991  14:49:58" )
  34.    EX_Bueno()
  35.  
  36.  
  37.    *══ Setup all the hot-keys ════════════════════════════════*
  38.  
  39.    SetKey(K_F1,    {| p,l,v | VS_Help(p,l,v)    } ) // Context Sensitive Help
  40.    SetKey(K_ALT_H, {| p,l,v | VS_MakeHlp(p,l,v) } ) // Create Help
  41.    SetKey(K_ALT_L, {|       | VS_FakeLck()      } ) // Simulate Network Locks
  42.    SetKey(K_F5,    {|       | PickFld()         } ) // Pick a field for index
  43.  
  44.  
  45.    *══ Here we go... ═════════════════════════════════════════*
  46.  
  47.    BEGIN SEQUENCE
  48.  
  49.       *══════════════════════════════════════════════════════════*
  50.  
  51.       SELECT 0
  52.       IF .NOT. VS_Use(GETE("DATADICT")+"_DictHdr",.F.,"_DictHdr")
  53.          BREAK
  54.       ENDIF
  55.  
  56.       IF .NOT. FILE(GETE("DATADICT")+"_DictHdr.Ntx")
  57.          IF .NOT. VS_ShowNtx(GETE("DATADICT")+"_DictHdr","_DICTHDR->DBF_NAME","C")
  58.             BREAK
  59.          ENDIF
  60.       ENDIF
  61.  
  62.       dbClearIndex()
  63.       dbSetIndex(GETE("DATADICT")+"_DictHdr")
  64.  
  65.       *══════════════════════════════════════════════════════════*
  66.  
  67.       SELECT 0
  68.       IF .NOT. VS_Use(GETE("DATADICT")+"_DictFld",.F.,"_DictFld")
  69.          BREAK
  70.       ENDIF
  71.  
  72.       IF .NOT. FILE(GETE("DATADICT")+"_DictFld.Ntx")
  73.          IF .NOT. VS_ShowNtx(GETE("DATADICT")+"_DictFld","DBF_NAME+FIELD_NMBR","C")
  74.             BREAK
  75.          ENDIF
  76.       ENDIF
  77.  
  78.       IF .NOT. FILE(GETE("DATADICT")+"_DictFl2.Ntx")
  79.          IF .NOT. VS_ShowNtx(GETE("DATADICT")+"_DictFl2","DBF_NAME+FIELD_NAME","C")
  80.             BREAK
  81.          ENDIF
  82.       ENDIF
  83.  
  84.       dbClearIndex()
  85.       dbSetIndex(GETE("DATADICT")+"_DictFld")
  86.       dbSetIndex(GETE("DATADICT")+"_DictFl2")
  87.  
  88.       *══════════════════════════════════════════════════════════*
  89.       SELECT 0
  90.       IF .NOT. VS_Use(GETE("DATADICT")+"_DictNtx",.F.,"_DictNtx")
  91.          BREAK
  92.       ENDIF
  93.  
  94.       IF .NOT. FILE(GETE("DATADICT")+"_DictNtx.Ntx")
  95.          IF .NOT. VS_ShowNtx(GETE("DATADICT")+"_DictNtx","DBF_NAME+ORDER","C")
  96.             BREAK
  97.          ENDIF
  98.       ENDIF
  99.  
  100.       dbClearIndex()
  101.       dbSetIndex(GETE("DATADICT")+"_DictNtx")
  102.  
  103.       *══════════════════════════════════════════════════════════*
  104.  
  105.       VS_NewScrn()
  106.  
  107.       DO WHILE .T.
  108.  
  109.          IF EMPTY( S_DICTHDR() )
  110.             EXIT
  111.          ENDIF        
  112.  
  113.       ENDDO
  114.  
  115.    END SEQUENCE
  116.  
  117.    EX_Adios()
  118.  
  119. RETURN(NIL)
  120. *** EOF: Maint() ************************************************************
  121.             
  122.  
  123.